﻿using System;
using System.Collections.Generic;
using System.Text;
using log4net.Core;
using System.Xml.Serialization;

namespace log4net.Extensions.Appender.Web.Client
{
    public partial class LoggingEventMessage
    {
        [XmlIgnore]
        public string ServiceUrl { get; set; }
        [XmlIgnore]
        public bool IgnoreCertificateErrors { get; set; }

        public LoggingEventMessage()
        {

        }

        public LoggingEventMessage(LoggingEvent logevent, string message)
        {
            this.Domain = logevent.Domain;
            this.Identity = logevent.Identity;
            this.Level = logevent.Level.DisplayName;
            this.LoggerName = logevent.LoggerName;
            this.UserName = logevent.UserName;
            this.TimeStamp = logevent.TimeStamp;
            this.ThreadName = logevent.ThreadName;
            this.RenderedMessage = message;
        }
    }
}
